Skip to content

Add OOM test for component InstancePre::instantiate_async#12993

Merged
fitzgen merged 4 commits intobytecodealliance:mainfrom
fitzgen:handle-oom-in-component-instance-pre-instantiate-async
Apr 9, 2026
Merged

Add OOM test for component InstancePre::instantiate_async#12993
fitzgen merged 4 commits intobytecodealliance:mainfrom
fitzgen:handle-oom-in-component-instance-pre-instantiate-async

Conversation

@fitzgen
Copy link
Copy Markdown
Member

@fitzgen fitzgen commented Apr 8, 2026

Fix infallible allocations in the component model instantiation path:

  • Use TryPrimaryMap for instance_states and instances in ComponentInstance
  • Use TryPrimaryMap for instances in ComponentStoreData
  • Use TryVec for scopes in ComponentTasksNotConcurrent
  • Use TryPrimaryMap for guest field in ResourceTables
  • Use try_new for Arc and Box allocations in instantiation/call paths
  • Make push_component_instance and push_instance_id return Result
  • Make enter_call_not_concurrent return Result

Fix infallible allocations in the component model instantiation path:

- Use TryPrimaryMap for instance_states and instances in ComponentInstance
- Use TryPrimaryMap for instances in ComponentStoreData
- Use TryVec for scopes in ComponentTasksNotConcurrent
- Use TryPrimaryMap for guest field in ResourceTables
- Use try_new for Arc and Box allocations in instantiation/call paths
- Make push_component_instance and push_instance_id return Result
- Make enter_call_not_concurrent return Result
@fitzgen fitzgen requested review from a team as code owners April 8, 2026 22:40
@fitzgen fitzgen requested review from alexcrichton and removed request for a team April 8, 2026 22:40
@github-actions github-actions bot added fuzzing Issues related to our fuzzing infrastructure wasmtime:api Related to the API of the `wasmtime` crate itself labels Apr 9, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Subscribe to Label Action

cc @fitzgen

Details This issue or pull request has been labeled: "fuzzing", "wasmtime:api"

Thus the following users have been cc'd because of the following labels:

  • fitzgen: fuzzing

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@fitzgen fitzgen enabled auto-merge April 9, 2026 18:54
@fitzgen fitzgen added this pull request to the merge queue Apr 9, 2026
Merged via the queue into bytecodealliance:main with commit 38c2e2a Apr 9, 2026
48 checks passed
@fitzgen fitzgen deleted the handle-oom-in-component-instance-pre-instantiate-async branch April 9, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fuzzing Issues related to our fuzzing infrastructure wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants